
function de(target:any) {
    
}


// 类
class wechaty{
    static names = 222222

    private pri_name=333333333
    protected protected_name=333333333
    public public_name = 333333333
    

    get public_names() {
        return 11
    }

    set public_names(a) {
        
    }
    
    getNames = () => {
        console.log(this,wechaty)
    }
}


// 泛型
function Generics<T extends { new( ...args ) : { } } >(length:T){

    return class woqu extends length{
        name:11111
    }
}


namespace Validtor{
    export let name=32333
}

// 命名空间
namespace Validation {
    export interface StringValidator {
        isAcceptable(s: string): boolean;
    }

    const lettersRegexp = /^[A-Za-z]+$/;
    const numberRegexp = /^[0-9]+$/;

    export class LettersOnlyValidator implements StringValidator {
        isAcceptable(s: string) {
            return lettersRegexp.test(s);
        }
    }

    export class ZipCodeValidator implements StringValidator {
        isAcceptable(s: string) {
            return s.length === 5 && numberRegexp.test(s);
        }
    }
}

class zhu{
    name=888888
    constructor() {
        
    }

    getname() {
        
    }
}


// 类的继承
class wei extends zhu{
    constructor() {
        super()
    }
    getnames() {
        
    }
}